package org.jeecg.modules.demo.api;
import org.jeecg.modules.demo.api.fallback.UpmsHelloFallback;
import org.jeecg.modules.demo.dto.DeptDto;
import org.jeecg.modules.demo.entity.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient(value = "jeecg-upms", fallbackFactory = UpmsHelloFallback.class)
public interface UpmsHelloApi {

    /**
     * upms hello 微服务接口
     * @param
     * @return
     */
    @GetMapping(value = "/upms/hello")
    String callHello();

    /**
     * 查询所有的商户
     * @param
     * @return
     */
    @GetMapping(value = "/upms/dept/dept/queryList")
    List<Dept> queryDept(@RequestParam("id") Long id);



    @GetMapping(value = "/upms/dept/dept/queryByDeptId")
     Dept queryByDept(@RequestParam(name = "id", required = true) Long id);


    /**
     * 修改绑定
     * @param username
     * @param merId
     */
    @GetMapping(value = "/upms/dept/dept/updateUserIds")
    void updateUserIds(@RequestParam String username,@RequestParam Integer merId);


    @GetMapping(value = "/upms/dept/dept/updateDeptPric")
     void updateDeptPric(@RequestParam Long merId, @RequestParam BigDecimal price);

}
